#include "matrix.h"


int cmat_gpu(const int *in, const int len, int *out) {

    cudaError_t cudaStatus;
    cudaStatus = cudaSetDevice(0);
    if (cudaStatus != cudaSuccess) {
        return 0;
    }

    cudaStatus = cudaMalloc((void**)&out, len);
    if (cudaStatus != cudaSuccess) {
        return 0;
    }

    cudaStatus = cudaMemcpy(out, in, len, cudaMemcpyHostToDevice);
    if (cudaStatus != cudaSuccess) {
        return 0;
    }

    return 1;
}

int cmat_mul_gpu() {
    return 1;
}

int cmat_free_gpu(int *ptr) {
    cudaFree(ptr);
    return 1;
}